#include <iostream>
#include <vector>

using namespace std;

int findFirst(vector<int>& nums, int num) {
    int first_loc = 0;
    for(int i = 0; i < nums.size() - 1; ++i){
        if(nums[i] == num)
        {xx
            first_loc = i;
            break;
        }
    }
    return first_loc;
}

int findLast(vector<int>& nums, int num) {
    int last_loc = 0;
    for(int i = nums.size() - 1; i >= 0; --i){
        if(nums[i] == num)
        {
            last_loc = i;
            break;
        }
    }
    return last_loc;
}

vector<int> assemble(int first, int last){
    vector<int> output = {first,last};
    return output;
}

int main()
{
    vector<int> input = {5,7,7,8,8,10};
    vector<int> output;
    findFirst(input,8);
    findLast(input,8);
    assemble(findFirst(input,8),  findLast(input,8));

    output = assemble(findFirst(input,8),  findLast(input,8));
    for(auto& i: output){
     cout << i << endl;
    }
} 